import React from "react"
import ThemeContext from "./testContext"
class Child extends React.Component{
  static contextType = ThemeContext
  constructor(props){
    super(props)
  }
  componentDidMount(){
    console.log("打印这个东西",this.context,this.props)
  }
  handleClick = ()=>{
    console.log("111",this.context)
    this.context.fackFun("傻逼react")
  }
  render(){
    return (
      <>
        <div onClick={this.handleClick}>this is Child {this.context.stateDate} </div>
      </>
    )
  }
}

export default Child